import {BasicColumn, FormSchema} from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '租户编号',
    dataIndex: 'tenantId',
  },
  {
    title: '账号类型:1-服务商 2-商户 3-商户应用',
    dataIndex: 'infoType',
  },
  {
    title: '服务商号/商户号/应用ID',
    dataIndex: 'infoId',
  },
  {
    title: '支付渠道代码',
    dataIndex: 'channelCode',
  },
  {
    title: '支付渠道费率',
    dataIndex: 'channelRate',
  },
  {
    title: '接口配置参数,json字符串',
    dataIndex: 'channelParams',
  },
  {
    title: '备注',
    dataIndex: 'remark',
  },
  {
    title: '状态：0-停用, 1-正常',
    dataIndex: 'status',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'tenantId',
    label: '租户编号',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'infoType',
    label: '账号类型:1-服务商 2-商户 3-商户应用',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'infoId',
    label: '服务商号/商户号/应用ID',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'channelCode',
    label: '支付渠道代码',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'channelRate',
    label: '支付渠道费率',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'channelParams',
    label: '接口配置参数,json字符串',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'remark',
    label: '备注',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    field: 'status',
    label: '状态：0-停用, 1-正常',
    component: 'Input',
    colProps: {span: 6},
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: 'ID',
    component: 'Input',
    show: false,
  },
  {
    field: 'tenantId',
    label: '租户编号',
    component: 'Input',
    required: true,
  },
  {
    field: 'infoType',
    label: '账号类型:1-服务商 2-商户 3-商户应用',
    component: 'Input',
    required: true,
  },
  {
    field: 'infoId',
    label: '服务商号/商户号/应用ID',
    component: 'Input',
    required: true,
  },
  {
    field: 'channelCode',
    label: '支付渠道代码',
    component: 'Input',
    required: true,
  },
  {
    field: 'channelRate',
    label: '支付渠道费率',
    component: 'Input',
    required: true,
  },
  {
    field: 'channelParams',
    label: '接口配置参数,json字符串',
    component: 'Input',
    required: true,
  },
  {
    field: 'remark',
    label: '备注',
    component: 'Input',
    required: true,
  },
  {
    field: 'status',
    label: '状态：0-停用, 1-正常',
    component: 'Input',
    required: true,
  },
];
